#pragma once
#include <string>
#include <unordered_map>
#include <memory>
#include "Socket.hpp"
#include "InetAddr.hpp"

using namespace SocketModule;
class HttpRequest
{
public:
    HttpRequest()
    {
    }
    ~HttpRequest()
    {
    }

private:
    std::string _method;
    std::string _url;
    std::string _version;
    std::unordered_map<std::string, std::string> _headers;
};

class Http
{
public:
    Http()
    {
    }
    void GetRequest(std::shared_ptr<Socket> sock, const InetAddr &addr)
    {
        char buff[4096];
        ssize_t n = sock->Recv(buff, sizeof(buff));
        buff[n] = 0;
        std::cout << buff;
    }

    ~Http()
    {
    }
};